package com.mworld.galaxy.bull.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name = "t_user_member")
@Inheritance(strategy = InheritanceType.JOINED)
@PrimaryKeyJoinColumn(name = "c_id", referencedColumnName = "c_id")
public class MemberUser extends User {

    public static final char GENDER_MALE = 'm';
    public static final char GENDER_FEMALE = 'f';

    private String cellNum;
    private String phoneNum;

    public MemberUser() {
    }

    public MemberUser(Long memberUserId) {
        super(memberUserId);
    }

    @Column(name = "c_cell")
    public String getCellNum() {
        return cellNum;
    }

    public void setCellNum(String cellNum) {
        this.cellNum = cellNum;
    }

    @Column(name = "c_phone")
    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public void updateBaseInfo(MemberUser memberUser) {
        cellNum = memberUser.getCellNum();
        phoneNum = memberUser.getPhoneNum();
    }
}
